Adds groups to API

Fixes #6