Add support for calling functions by name

I also added a debugging function to dump the current context.