Fixed a bug in Root.import

Now it properly processes already imported modules.
Wrapper for Root.js

Now the script is executed through an immediate function.