Refactoring the grid some more