Added in comments
Added in a few comments and made the code more readable