angular refactor of ui
working refactor