Refactored task classes to remove fragile enable_if logic.