Changes to serialization.
Remove a replaceAll.
Merge pull request #29 from knowitall/serialize2

Changes to serialization.