Fixed tests; updated documentation