updates to impfunc_doc script - still not finished
more cleanup and fixes in rst