Improved serialization.
Updated README.