Fixed some doc, added some comments