Fixed up serialization and added a few new API calls.

Still need to add redis support and better serialization and
deserialization.