Grunt Refactor (to trunk)

See #1751