Various minor patches

They may require some discussion and aren't really related.