Grid struct gen

This refactors the generators' code to use an ancestor class with the code common to all - the `cGridStructGen` class.