Added some comments to follow the code better.