I'd move this method definitions outside the task. Just keep them in the namespace?