Attempt at implementing the A* Algorithm.