Working on faster serialization.
* fix the bug in some test cases
Merge pull request #2 from MaggieQi/faster-serialization

Faster serialization