Added support for multiple group clauses - closes #26