Move self executing anon functions to globals