Script tweaks

Improved comments throughout.