Minor cleanups and enhancements