Merge pull request #43 from Doha2012/master

Add TestWriter
small persistence fixes
Merge pull request #44 from Doha2012/master

Modify TestWriter
Merge pull request #45 from Doha2012/master

Modify test methods
Merge pull request #46 from Doha2012/master

Add few methods
cleanup work
testing work for writing to fiule
resolve conflict in TestWriter