Improve sendMessage by accepting two callbacks instead of just one