Refactored handling of topology related information into seperate class