Feature/improve controller

Various cleanups for the API controller.