cleaned up code with tips from JSHint
Merge pull request #29 from mcandre/master

Tidied up the code a little bit using JSHint