Javascript A* Search Framework