Extract ui_init_connection() into smaller functions to clarify purpose. Signed-off-by: Henrik Andersson <hean01@cendio.com> Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>