Partial clean up of code in taskLib