Rewrite for compatibility with current Atto plugin system