Refactor and fix issues

Refactor of angular code
Refactor of calls
Refactor names