Tools for denoising covariance and correlation matrices