API interface made more clear. Added database serialization to hdd ( commit method )