Generate help files as well, and simplify a bit

(cherry picked from commit 0051c6b532f83f8994ca9ab6b1900752574ea11b)