Added commets

Added some comments to the source so it's easier to understand