Added some " , deleted lines not needed, and fixed the returns from Cocoadialog.