Merge branch `rewrite` into `master`.
Exports and cleanup.
Test and cleanup.