Front controller refactoring