update docs; implement more serialization stuff