Improving code readability. 

May have uncovered a bug.

Proof that code is functionally equivalent (just more readable): http://jsbin.com/xumipa/1/edit?js,console


(I did this because I am not smart enough to understand the code as it was previously written with 100% confidence without actually running it)