Improve `Task` class