Starting to implement #239: first part, serialization, now supported.