Add stats api, refactor clients for multiple services