Cleaned up script, added comments

Cleaned up the script, added comments throughout and generally made it
easy to read for tomorrow’s presentation.