Fixed issue with diagonal not being exactly 1.
Added test for correlation and difference in correlation.
Added and modified examples.