Tests and bug fixes.
Tiny doc fixes.