Fixed callback in Thread and Unit.
Callback is set in the constructor by default.
Other fixes around.