Added toMap()-function in BasicDocument
Rewrote FlatDiskStorage for new directory structure.