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.
Merge pull request #10 from tbranyen/linting

Reformatted source code to pass linting checks.