Applied best practices on controllers and models