Cleanup and fix potential bugs with scripts.
Cleanup and fix potential bugs with scripts.

GreenPix/editor,GreenPix/editor,GreenPix/dilia,GreenPix/dilia,GreenPix/editor,GreenPix/dilia,Nemikolh/dilia,Nemikolh/dilia,Nemikolh/dilia,GreenPix/editor,GreenPix/dilia,Nemikolh/dilia