Added some more explanatory comments.