Extracted a few methods from calculate_score