Test and examples, fix jshint errors