Clean up rewrite rules