Merge branch 'rewrite'