Pushing the app file and some minor refactoring