Comments on the code to determine how it works.

I believe I understand everything except the parts on the end that are to actually add data to be show on the webpage.