Some miscellaneous minor improvements