Fix documentation and testing