Refactor text file parsing code into TextParsingHelper util class