Remove deprecated conditions and a unused variable