Refactor price calculation to a calculation pipeline