Moved product logic into the product provider for readability.