Callbacks cleanup

Various *callbacks.[ch]* cleanups, some obvious and some maybe questionable (especially 517bf5f960fd4559073bf62039893aa39f8a4bf8, and possibly 0b32227bf0892f8bf430d712cae1fa73741c906a and 9bf647c5c3117d36c4ea7c99f05ad99e03106045) -- please tell me what you think.