Add support for `message` function, fixes #139

[WIP] tests are broken. Looks like the message function is not executed inside of the tests. I don't know how to fix it.