Refactoring of correlation formula, charting functions and table to chart fucntions from Datasuggestion (now superseded)