Refactor board.rb