added getCommentDensity, fixed bugs.