Start adding callbacks.
Fix compile error on Raspberry Pi. Fixes #2