Domain serialization rewrite