WIP #882 Add more hooks v2

Minor improvements.