chore: Reorganize callbacks and dispatchers internally (#3937)