initial change to persistent data structures
Many fixes, see CHANGELOG for 0.6