cleanup and enhancements