Add some comments to explain whats going on.