Improved resolving of events for Code and Callback