Add groups pane, fix some bugs