Add tests for transactions and connections
Use proper formatting for parameters
Document the context managers