Implement a few hooks.