I added more complete comments, And cleaned up some stuff.