General cleanup putback

* Several new modes
* Topology functions