Some changes to script init