Making MAstar follow the AStar pattern