Just for sanity's sake, can you make sure these queries are prepared?

Other than that, looks great. Ship it!