Set default host and port, removed unnecessary code.