various fixes to A* and map (to make them work with each other) and an apparently working version of JPS without proper testing