Bug 929197 refactor use of connection objects

@selenamarie r?

(cc @twobraids @AdrianGaudebert)