Refactor csv_modifier.rb for arrowhead programming