Remove functions from global namespace

Wrap code in a call to anonymous function.