Sets cleanup round 2
Hamming code cleanup
Gates cleanup