updated docs, minor lib fixes