tests and fixes.
Updated docs.