Improved proxy selection algorithm. Adjusted default timeout.