WIP - localhost exception

These changes fix the functional test suite.  I'm still working on the rest of our tests, but if you see any patterns forming in my fixes that I should avoid, please let me know!  I wanted to open the code review on this because it's a lot of changes.
is this supposed to be commented out?