minor enhancements and code cleanup