Reduce duplication in Bootstrap generator.

* Move magic strings into constants.
* Extract layout logic into private method.
Merge pull request #207 from patricksrobertson/pr-bootstrap_cleanup

Reduce duplication in Bootstrap generator.