Comments and cleanup.
Merge branch `rewrite` into `master`.