Added Correlation functionality
Modifications for OSX