Started implementing connection thread