Refactoring Analytics to use new specifications