moved all vars out of global scope.
Merge pull request #10 from staabm/iife

moved all vars out of global scope.