Misc minor improvements