changing from regex to proper line parser

Will need dragging through the rest of the program...