sendMessage now support optional callbacks. Fixes #40