more code improvements
more code improvements

NativeScript/NativeScript,NativeScript/NativeScript,hdeshev/NativeScript,genexliu/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript,hdeshev/NativeScript,NativeScript/NativeScript,hdeshev/NativeScript,genexliu/NativeScript,genexliu/NativeScript