Move utils in grid module into their own utils module