added some doc and did some clean up