tidy up and check for missing hooks as well as undoc'ed