Refactor SwitchConnectionProvider a bit