Added debugging
Added debugging
Moved thread to Arena.