Updated documentation and tests