Layout generator - fixes #15

Bringing layout generator code in-line with other generators.