Separated client and server specific functionality into ClientBase and ServerBase.