Groups and improved error handling