Added support for group names with spaces; Addressed issue with empty fields.