Added comments and adjusted whitespacing.