Many comments added to code

Hi I added comments I don't know if this is the right thing to do this.