Editing to work with cocoadialog