public override void AwakeFromNib()
        {
            base.AwakeFromNib();
            Window.WillClose += (sender, e) => { NSApplication.SharedApplication.StopModal(); };

            GroupNameBox.Changed += (sender, e) =>
            {
                if (string.IsNullOrWhiteSpace(GroupNameBox.StringValue))
                {
                    return;
                }
                SelectedNode.Name = Metadata.RenameGroup(PathToSelectedGroup(), GroupNameBox.StringValue.Trim());
                ReloadListsWhilePreservingSelections();
                MadeChanges = true;
            };

            GroupList.DataSource = Groups;
            GroupList.Delegate   = new GroupOutlineDelegate(Groups, UpdateControlAvailability);

            SongList.DataSource = Songs;
            SongList.Delegate   = new SimpleTableDelegate <SongEntry>(Songs, UpdateControlAvailability);

            var remainingSongs = Metadata.Songs.ToList();

            foreach (GroupEntry g in Metadata.Groups)
            {
                PopulateGroup(null, g, remainingSongs);
            }
            foreach (SongEntry e in remainingSongs)
            {
                Songs.Data.Add(e);
            }

            UpdateControlAvailability();
            GroupList.ExpandItem(null, true);
        }