angularjs refactoring & low redesign