Added API controller, fixed routes