Fixes to documentation and tests