Added ability to choose ip to connect to.