Propagation added to correlations, first pass at performance improvements, debugged.