Grids clean up

- Cleaned up grid  implementation and it's tests.