Moved the serialization implementation up in the chain of sources