Moved the heap-related methods in the Vertex class, made them inline.