Correctly return true or false depending on compare function. Logic of compare function reversed for improved logic readability. Remove compare function from add_edge because if you want to have additional functionality in add_vertex you should extend it.