Added basic grid generation.