#7: Refactoring controller