Minor fixes
Add getConnection function to get the underlying db connection