Changed heading to non-modulus
Lots of cleanup.