fix global leak

forgotten `var` statement when defining `defaults` causes a leaked global
more global leaks

no longer leaking `items` or `i`
Merge pull request #2 from stephenmathieson/fix/global-leak

fix global leak