Refactor board class