Adding data unpacking functionality to downloadData.