minor enhancements and cleanup