Comments added in the code for readability

Updated with a few comments for easy readability of the code