Fix bad method used
Fix NPE when body is null
Formatting
Use standard library functionality to wait for threads