Adds in JSHint RC file and formatting changes.

Updated source to follow rigid set of rules described in the .jshintrc
file.

- Fixed all erroneous semicolon uses and add all missing ones.
- Specified allowed globals.
- Adjusted some logic to satisfy linting rules.