Added a couple of socket accessor methods.
Minor clean-ups.