Treat SQL statements like objects, and construct them more cleanly