Fixing documentation and tests