Add module reference serialization code