Use hooks instead of primitive callback procedures.