Working version. Combined metrics and topology tracking.