Added additional validations

Also, minified js.