phoromatic: Refactor server connection setup