Refactored controllers and structure