refactoring app