Creates analytics module
Fix in preamble
Remove code moved to analytics
update caspo-learn to use analytics module