Added customisable grid support

Adds the customisable grid features outlined in issue #2.