debugging js code in package support

and split Runtime.cpp file, fix some memory leak