DRY code using ternary statement.  Improve variable names.