Grunt improvements

Here's some simple improvements to the Gruntfile. No API or workflow changes, just standardization, Grunt best practices, code reduction, and some bugfixes.