various minor improvements