Improved pathfinding

Implemented A* pathfinding to the move_towards function.