added some important comments to the serialization code for Foreign and Module.