Refactored with Angular