changed line parser to handle both csv and txt files. also fixed line end chopping to work with windows and mac files.