First working version of script.  Updated code book (work in progress)