Added heuristics funtion to problem type for A*, and made A* use it properly