Made script.js sort items

- Added getPercentageProfit method to IntegratedItem
- Replaced percentage calculations in script.js with getPercentageProfit
- criteriaItems is now sorted before the HTML table is constructed