Check for divide-by-zero. Added support for modulus operator