Scheme Clean-up

Changed all the ifs to modulus for optimizations + space saving