refactoring angular app