More bugfixes (remove spaces from group lines, replace with underscores and allow these underscores to be used in group names.