Various minor improvements