Add dynamic handler creation
Fixes to dynamic handler invocation