Added a lot of commenting