add jshint with*out* gulp, fix js files, add tests

![magic](https://cloud.githubusercontent.com/assets/537567/2877697/4b17ee08-d451-11e3-941f-2d3b1b8be2b3.gif)