Added ability to dispatch global function or construct object