ENH: Restructure the class hierarchy to share some routins between server and client.
STYLE: Change class names.