minor fixes for Aled's code review comments, and removed deprecated TaskStub