Angular refactoring