Separated serializing and deseralizing