Add some comments to make the code clearer.