Why is this function in the global scope? Should be moved inside the IIFE.