Addresses issue #61. Fold state is now persisted correctly
Simplified the data structure for storing fold states in preference file