Remove useless code & add comments.