Split the JS into two files.
Added A* functionality.