Moved recipe logic into a separate file.