use of configuration classes

changed client and server to use configuration classes when
connecting/initializing