The dispatch table works now

but is not yet fixed for "triggers"

corrected a few bugs.
introduced a few bugs.