refatored usign angularjs
remove unused code
refactored