Correctly Fixed Search

Instead of editing the counters and such If statements now wrap the
entire addItem so that the item is never even added. and also wrapping
the database function that returns an object. One major difference is
the find db is called from outside the if statement.