Added mapping of functions with events and bodies