Cleartable function implemented and consolidated logic