Refactored to separate state of board from board actions