core controller refactoring