cleaned up SourceDlg, removed all unused code