Prep queries. With tests.