Cleaned up grid.js