Move $dlg and $contributors to higher scope