Some changes to parsing and run scripts