Updated legacy.py to understand the new topo.version format