Even more refactoring on dataParser.

Made it into a class. Structured it into functions. Structured type
comparison as a dictionary.