Minor refactor connection and device startup