Refactored main.js and working to add checkbox form validation