Survival analysis refactored