Had to make a few tweaks to ensure html validity (namely the elaborate comment tagging around inline javascript blocks) and to prevent the courseArray from being written out twice to the containing file.
Also added comments to various files and updated the readme.txt file so that next time any modifications need to be made, or we decide to implement something similar somewhere else, it will be simpler.