Wrapping code into self execution functor

Preventing functions from declaration in window namespace