Port empathy.c to new API