Adding support for endpoint selection in config file. Added function for communication with second endpoint.