Added some explanatory comments.