Added JSHint options to main.js and updated code to validate; got rid of a few redundant brackets