Merge pull request #171 from csmith/master

Fix more deprecations.
Remove getConnection().
Fix rogue getConnection().
Rename getOptionalConnection() to getConnection().