Get rid of the magic when assigning callbacks.