Fixes and refactoring of LoadCSVPipe.scala