Added closure to avoid collisions in global namespace.