almost completely refactored  UI to Angular JS