Still needs work. Fix sweeps.

Good enough to be a checkpoint.