Made various fixes and the client and server are almost working with configuration files.