Added jshint validation configuration and small changes

Hello!

Just picked your project from npm and as a test and practice I added JSHint validation config and changed a little bit according to JSHint suggestings.