Changed the server to handle a variety of clients using the factory design pattern