Angular code refactoring.