cleanup big time
Merge remote-tracking branch 'upstream/rewrite' into rewrite