Optimized remove method