Refactored script parser
Refactored script parser