addition of comments & clean-up of obsolete code