Switch to using % for computing remainder.