Tighten up types on callbacks.