Add callback support

Fixes #9. Also remove documentation for "StateMachine classes", as they really don't work in Lua