Improvements on scripts