Structured the controller a bit