Various minor improvements/fixes.