cleanup the comments around the rewrite code