simplify/style-tweak/refactor conditionals in client, overstate, key
Merge pull request #4742 from hulu/conds-client-overstate-key

simplify/style-tweak/refactor conditionals in client, overstate, key