cleaning up, fixing code style
get group membership data from API
sync group membership information
some DRY optimizations