Implemented board undo to reduce the amount of board copying.