Refactoring Angular