Organize callbacks in a sane way