Simplify pipeline.js file.