Refactored TaskClient to be instantiated