Improved cleanup.