Added child threads backward compatibility by conversion and improved thread safety as well as overall code quality