Did the last change. The threaded functions should be working now. Lacking debugging though.