Comments

I added comments on every major part of this code, it may be overkill but best to over explain right. Comments also say what some lines do that are more important than you may think.