Changed the input type of parseLines to a string in order to be able to use a closure to read the file