Added explicit __getstate__ and __setstate__ to enable pickling of CleverObject objects