Refactored Gruntfile.js for use across environments.