run scripts from context menu

scripts can be run from context menu
refactor code