more work on download part of analytics
Scans + base model
refactor, simplify