Added comments for easier readability.