Using 'Int.quot' for division, instead of 'div'
Fixing precedence of 'And' and 'Or'