Improvements to scripts