tests, documentation, fixes