code cleaning, doc update