CPP - AStar - Uses typedefs and refactors code.