AnalyticsEngine: code cleanup