Add undo tree mode