Enhance confidence interval autoscale code

Now intervals can be constructed with user defined proportions in the tails.