A total rewrite.