Merge total rewrite into master.