add Gruntfile with JSHint task and fix some code style inconsistencies