Finished layered serialization code.