Updated to create a unique key for each result value
Changed the way unique keys are created for results and updated functions to match.