updated script parser. Long time ago edits.