Merge pull request #25 from Staance/jul29_2

Polymorphic serialization and de-serialization.
Merge remote-tracking branch 'upstream/master'