Adding comments and cleaning code
Cleaning and adding code comments