add documentation, tweak tests a little"