More serialization

Added ability to read/write any collection.