Fixed JSHint errors and warnings.
Merge pull request #145 from longsleep/jshint-fixing

Fixed JSHint errors and warnings.