initial revision for tony
remove dead code
remove server_host and server_port that are now unused