fix some issues in script generator
fixed a bug
Refactored the code
Merge branch 'master' of https://github.com/wso2-dev/developer-studio