added SUM, refactored UriHelper, created UriBuilder, fixed GROUP BY