Rewrite tweaks