Sort out the grid