Added more explanational comments.