docs: function executeOnready( script, fn, Class, data ) {
  
  			// for instance of: check if given class is a interface implemeted by
  			// host class.
  			var self = this;
  			this.getClass = function( ) {
  				return self;
  			};
  
  			this.new = function () {
  				return new self(arguments, '___argslist___');
  			};
  
  			this.toString = function( ) {
  				return script.Class;
  			};
  			if(script.baseClass){
  				this.base = fm.stringToObject(script.baseClass);
  				this.prototype.getSub = function( ) {
  					return self;
  				};
  			}
  
  			this.serialize = Serialize;
  			this.clone = function(){
  				var data = this.serialize(null, true);
  				var instance = new (this.getClass())(data);
  				for(var k in data) {
  					instance[k] = data[k];
  				}
  				return instance;
  			};
  
  			creareSetGet(this);
  			script.ics = getAllImportClass(script.imports);
  			script.args = getAllArgsSequence(Class);
  			getReleventClassInfo.call(script, Class, fn, this);
  	        this.package = script.Package;
  			typeof script.shortHand == 'string' && addShortHand(script.shortHand, this);
  			this.isAbstract = script.isAbstract;
  			//
  			// Do not add script info in proto fror interface
  			// script.isInterface && addFieldsInStorage.call(pofn, script, pofn,
  			// true);
  			this.prototype.$get = function( key ) {
  				return script[key];
  			};
  
  			createSetterGetter.call(this);
  
  			function isInterface( cls ) {
  				var interfs = script.interfaces || [];
  				for ( var k = 0, len = interfs.length; k < len; k++) {
  					if (createObj(interfs[k]).instanceOf(cls)) {
  						return true;
  					}
  				}
  				return false;
  			}
  			this.equals = function( ) {
  				return this === arguments[0];
  			};
  			this.instanceOf = function( cls ) {
  	            if (!cls) return false;
  				return cls.getClass() == this.getClass() || this.base && this.base.instanceOf(cls) || isInterface(cls);
  			};
  
  			var obj ={};
  			for (var i in this) {
  				if(typeof this[i] === 'function'){
  					obj[i] = this[i];
  					continue;
  				}
  				(function(i){
  					function getter(){
  						return self[i];
  					};
  					function setter(v){
  						self[i] = v;
  					}
  					 if (Object.defineProperty) {
  						Object.defineProperty(obj, i, {
  							get : getter,
  							set : setter
  						});
  					}
  					else if (obj.__defineGetter__) {
  						obj.__defineGetter__(i, getter);
  						obj.__defineSetter__(i, setter);
  					}else{
  						obj[i] = self[i];
  					}
  				})(i);
  			};
  			obj.prototype = this.prototype;
  			Class.prototype = obj;
  			fileLoadeManager.iamready(this.getClass().toString(), this);
  			if(data && typeof data[data.length -1] == 'function'){
  				(function(fun){
  					setTimeout(function(){
  						fun(self);
  					});
  				})(data.pop())
  			}
  			if (typeof this.main == 'function') {
  				var s= this;
  				setTimeout(function(){
  					s.main(data);
  					delete s.main;
  				});
  			}
  
  
  			data = undefined;
  			if( typeof this.__iamready == "function") {
  				this.__iamready(this);
  			}
  		}