Working GetDecorrelation function. Modified function names. Cleaning style.