More safety checks and cleanup.