Implemented drawing the grid.