Overdue fixes.
Various minor changes