Comments on the code to determine how it works.

I have a good idea of how everything works I think except for the last parts on the end that actually assign things to the arrays to display on the webpage.