Added a few comments for sake of clarity.