Port the movement controller from web app to REST API.