Refactored the board class