Making the handleTotals function use the new search module