cleaned up the grid system a bit