Change all the *-callback functions to use channels