Added comments and cosmetic alterations.