Fixed datastructure check that had changed between PHP versions
Added functionality to add characters to groups, and other changes to
the group handling system