Separated out connections

- Various changes to get tests working
  - All work now except new API tests