fix bug in gradient model and improve ScriptView design
some improvements of complex script view controller