Implement avg by request
Make aggregations chainable. Fixes #30.
Merge origin/master