Refactor how fetching is done for groups, fixes #12.