add jshintrc and fix issues
Merge pull request #5 from fyockm/patch-2

add jshintrc and fix issues