Minor corrections to make the scripts work from scratch