serialization ~done + tests, misc. bugfixes and doc. update