Refactor for angular and some components