More minor speedups.
Lots more comments and cleanup.
More doc improvements.