Cleanup inspection logic.