Refactored DeepCloneFilter method to reduce code (with speed up bonus)