cleaned up the Analytics class