Added simple validation for form, moved some functions to utility.js file
fixed validation issue