Wrap correlation calculations
Rename sorted ingredients array
Extract row sorting
Refactor ingredient offset calculations