Also limiting the QPS to toposerv in case of error.

And making the code a bti more testable, gained 3% code coverage
in the directory.