Escape lookups correctly for CSV files
Code cleanup

[#61632610]