Added pickling support