fixed generating man pages, added some documentation