refactoring application, registration and cleaning controllers