Cleaning up code
Merge branch 'Separate-validation-JavaScript-from-main-file'