Begin threads infrastructure