Use VFSFileChooser, remove unimplemented or deprecated code, and fix some Windows and Mac errors.