Add jshint tasks, fix up js files

@ElementalSystems Spending too much time on this, so I'm going to stop for now, but thought you might find it interesting.

Still needs work, so don't merge yet!