Switched from constructors to functions in serialization code
Merge pull request #47 from mappum/master

Switched from constructors to functions in serialization code