Add support for anonymous callbacks and closures