Major spoilers ahead.