Updated js modules to be IIFEs