Added in serialization. Not as seamless as I want it to be, but works for now