Added some comments, Removed unused code.