Added a new grid function

There is now a new grid class.
The example has been updated to show it.