Plugable connection factory

(creating a pull request for this to expedite commenting)