Minor changes to Connection, Query and ORM classes