Improve API emit handler.
Update API methods accordingly.