Optimization, upped version to account for images almost being done, sorted categories and items