Refactored code in MyIngredientsActivity