Added comment highlighting a spot where an object is being created then abanadoned, this isn't something we want to do where we are concerned with performance.
Switched to using localhost instead of getting localhost name from the system. This is necessary because on flavors of debian the local host name and localhost resolve to different ips. This change makes the tests pass, but I'm not certain it is the right choice. Unfortunately the code in question is a bit of a mess, and i'm not certain the test is still doing what it's supposed to be doing.