Fix: use maps for scan data. Clean up