some more cleanup
added the heuristic distance function