some changes on scripting system