front controller refactoring