Small refactor of connection_types