Add preferences dialog and initial GUI.