some large systematic changes to make socket conversion easier. The