Implemented auto saving of refs.
Added Rec.init.