Css form validation, code cleanup

removed unneeded functions and added css form validation using ng-valid
directives