More work on grid and rect