Added a few comments describing the code