fix the scope issues that have been bothering me with this plugin ...

this commit has notes about my process that i'm leaving in here for
future reference