Improve API callbacks.