encountered a warning and discovered a non-functioning code block

The `$names` array was never being populated with anything so that code was all just cruft.

I've updated this function, but the overall file needs a bit of modernization.
Merge pull request #45 from zbtirrell/warning-fix

encountered a warning and discovered a non-functioning code block