Implemented Board class for better encapsulation