link deletion now depends on having results after SQL query + serialize wrapper deleted in most cases + replaced db.each with db.get