JSHint gave warnings

JSHint failed, fixed up based on the warnings.
Merge pull request #57 from pan100/JSHint

JSHint gave warnings