Refactor parse_data_item method