Fix #1788 and refactor pretty-printing code

* Remove dead pretty-printing code that was duplicated.
* Remove redundant space after `description:` field name.
* Eliminate trailing spaces on *some* blank lines.
* Convert all field names to lower case.
* Eliminate redundant `buildable: True` and `exposed: True` fields.
* Fix Haddock module comment.