Split the controller and the services and copy the pathfinding into the angular path