some minor changes in Pipe.js, see #170;

hoisted var used in multiple for-loops;
used array literal notation for controlCrossSections array;