Complete rewrite completed