added some doc and other cleanup