refactoring app build