Removed Session dependency, now a general doc object is passed and return to all save related methods.