fix leaking global variables

$ULs, $column, & d are all leaking into the global scope
Merge pull request #3 from phette23/master

Fixes leaking global variables.