Refactor as a set of singleton connections. Needs more cleanup.