Fix jshint warnings
Add first batch of tests