fix leaking global variables

$ULs, $column, & d are all leaking into the global scope