Libs of refactoring and bug fixes. Started making metadata based food.