Fixed a bug in the search function by overriding equals() in Ingredient.
Cleaned up the search function and restructured it.