made it so page will auto-refresh, and cleaned up comments

Summary: I've moved the update script into a function that is now called every 60 seconds (setInterval) to make the stats update. I've moved some code around and improved comments to hopefully make it easier to follow for others who need to edit it later on, so that is why it looks like there are more changes then there actually are