Improvement for $empty & $remove