Fix typo
Use already-computed backend count
In tests, use less likely port numbers
In tests, wait for all backends to finish
Merge pull request #3 from jondot/master

Make tests pass, fix typo, optimize a bit.