App refactoring