Added pre-allocation and computation of auto/cross-correlations for all units