Refactor pane and the undo view