Torus routing updated

* AS now has xbt_dynar that stores links
* Should work fine now
* Code cleanup