Several fixes and updates in scripts.