Refactoring angular structure