refactoring angular frontend