Correct docs for new hook, fix handling of optional parms, add test