Yeah - it's basically a question of using the var keyword ;)
The dt*** vars need to be available for all the functions declared inside your IIFE - and the rest just need to be declared inside their respective encolsing functions.
And then there's Element::store; it only recieves a key and a value - not an object with keys and values (though that would be a cool feature).
It will work once the above is fixed. :)