bug fixes on server, added async class for network handling