Rewriting, external and adhoc tests