Added comments, some cosmetic changes.