Add save and load
Fix bugs in load() method