Minor Cleaning

Added some Comments to make it easier to follow the code, I also
removed some unused code.