Modernized code to use latest pipes idioms