Complete rewritten `set` method. `saveObject` method is depracated now.
Complete rewritten `set` method. `saveObject` method is depracated now.