Serialize Module objects. Fix #200.