Moved topo/ep into topo/base, fixing imports and adding legacy code