Refactoring and separating out controllers and services.