group_by and distinct added to builder methods, some fixes, (and bugs?)