factored out parts of the control thread so we can either use a control thread or not.