Yet more plugin rewriting