Added __sleep and __wakeup methods