refactor: cleanup worker.addTaskFunction()