Task/cleanup2

This is the PR to add docs and tests for `Document`, `Session`, and `PlotObject` and possibly others. Also other assorted small general cleanup tasks.