Finish up rewrite