Fix Issue #3: Handle popping penultimate item

If we had only one item in the list, our while(i--) loop would start
from -1, and would always be true.  Fix this condition.

Also fix condition where we had a 0 in the dataset, so geometric
quantities were invalid (or 0), but then the 0 got popped out of the
dataset, so all geometric quantities are now valid.