Cleanup Task class.