Moved board logic into separate Board class