added support for global events and global variables init function
removed modules