Rewrite plugin for modular use