Changing CC algorithm to using copy instead of shared memory

As noted by Joey and Stefanie, using the shared memory model can get confusing. This is an attempt to get away from that, and uses copies of \hat{A}, \hat{B}, which is hopefully clearer than the shared-memory versions.