Additional matrix ops, with associated tests.
Minor edits.
Cleanup of distributions code.