major topology refactor