Removed unnecessary modulus operations

Argh! I'm obsessed with this function!!