Commented the code.
Added some comments.