Add support for group instances. Simplify and finally fix #2. Remove obsolete comments. Refactor to reduce confusion.