Added Density of States functionality and some comments.