using astar search with mazedistance funtion as hueristic
corrected the MST algo, also made it more modular
cleaning code