refactoring app with angular