Massive refactoring of board class