Re-factored methods in gruntfile.js