Simplify kf definition in shelter_storm()

No functional change.
Simplify chain detection

No functional change.