merge main.js and astar and map from master