Added comments.

See code for comments.