Environment serialization