Updated to use variable IP address and port.