Minor changes
Add writing of covariance