Fix incorrect path
add global registry of functions
expose function call interface to plugins