Refactored code to allow for different recipes.