Modified buildGrid.js in preparation for potentially moving application javascript out of grid.jade.