Autocorrelation task is now in the background. Also code cleanup