Cleaned Code Up

1. I added a HTML template instead of just a table. It felt more complete. I also included a couple basic styles.

2. I commented my php code a little. This should help understand my thinking a little more.