Rewrite plugin system