Did some work on the way SQL connections were being handled