C++ stuff. Template serialization included.