Make this a fixture.
Merge branch 'rewrite' into rewrite-39
Moved and some changes after review.