cleaned up the doc string and comments a bit.