Modifying data for 4.16

Using melt and cast to reshape the data in the format we want.