Implement and minimally test var serialization