Refactoring for analytics, harmonizing the API
More refactoring for analytics