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