Cleanups and enhancements.