Added more explanatory comments.