[WIP] Refactoring of Angular code