General cleanup, fix of dispatch invoke, addition of optional invoke params