Primary refactoring, extract base controller