parse_fields function for parsing out all info about class fields