Move encodeExplorer class to engine.php