Attempts to make this more thread safe
  * move connection initialization to the root file
  * add channel creation to the initializer so there's always a previous channel.
  * add a check to make sure the channel is closed before we set it to nil