Started writing thread code for migrator.