Mealplan code refactoring