Adding tests for Group.has_account() and Group.has_accounts().
Fixing implementation bugs.