Second update.  Fixing comments and making it readable.