Refactor analytics, merging repo and service into one; Done for Counters
with REST exposition