Changed parsing so it no longer reads the whole file into memory and instead uses pyparsings parseFile function.