Refactors master logic, worker stopping logic and adds unique id for each worker