Added some comments and some changes to whitespace.