Moved Sockthing code into appropriate packages to make it easier to
maintain.