Lazy save

Resolved the issues with #1424. I've reviewed @marqh's work, so the reviewer must accept my own addition: 0bec2ce (currently)