Improve group-by syntax

incorporates a bunch of structural changes that allow for future syntax improvements!