refactoring app builder