Simplify hook creation by having an events map.