Refactoring taskid stuff.