Make compile with Mavan, and rewrite half the plugin.