Problem: Some tests didn't clean up properly.

* Some tests did not properly destroy sockets at test completion
* This pull request also includes some of the name refactoring work started in the previous pull request.