fixing up some doc and squashing bugs