Simplify gather-by/values
Add test for gather-by/values