Improve code style.

Signed-off-by: Toha <tohenk@yahoo.com>
Add script function for getting current script context.

Signed-off-by: Toha <tohenk@yahoo.com>