Update add more IIFE functions and fix syntax issues