Refactoring controller builder