Added comments to the files

Added some more detailed comments to the files to get a better understanding of what is happening