Removed 'magic numbers' and replaced with constants (for X and O) where X = 1 and O = 0