add more serialization.
add macros in serialization.cpp to ease registration of types.