Reworking the functions that add and remove ingredients from the active search list

see individual commits for details