Refactoring to consolitate topology provider code.