Few bugfixes, and a ping utility in the tests directory.