Move serialization into own project