Cs fixes

I added a JSHint config file to check (the current) code style and made the code (mostly) consistent with it.