Clarify parsing of ternaries using more descriptive variable names; improve clarity of tests; remove redundant tests.