Add a proper WorldGroup class

It replaces the groupNames which were previously used all over the code.