removed module-level stuff to allow multiple connections