refactoring apps into one application