Revised serializer to be multi-thread capable.