Fix IIFE & make global

Fix IIFE and make into callable function in global scope.