Worker thread
Small modifications