Rewrite and fixup