Switched from constructors to functions in serialization code
Switched from constructors to functions in serialization code