Added Comments

Added comments to code to make it more understandable