Autorewrite (unproven)

- A bug fix + a better interface.
- Performance seems comparable to [autorewrite]
- There is an instantiation in examples/Simple