Refactored pipeCutter