Clean up group capture code
Merge branch 'master' into ST3