Cleaner callback code