Allow functions to be passed to executeAsync

Fixes #92.
Merge branch 'master' into geezer