Part 1 of a 2 part A* refactor.