Use with-connection block instead of open-global. closes #4