Refactored gamestate and board_ui classes