Rewrote to use new covariance functions.