Added alternate way to call defineAction$

Now, it is possible to call defineAction$ with only a named function. The
function name will be used as the name of the action.

Also additional tests and some bugfixes.