Added refactored script file