Finished implementing grid generation.

Tested. Correctly creates grids of arbitrary sizes for rendering.