Update code. Added Comments.