Refactor Topology