updated doc strings and cleaned it up a bit.