Fixed issues resulting from change to UnivariateData.
This is the final commit for version 0.4.0