a nicer encoding of rewrite rules.
a nicer encoding of generic rewrites