move some function implementations to aatopology.cpp

do a bit of cleanup