Improved confusing variable names and conditionals
Reorganized example for clarity