Factor out sample storage
Add missing files