Added XML and got it working correctly. Working on formatting CSV.