Added a few comments to make things a tad clearer