Extract main API into Funnel module

Signed-off-by: chatgris <jboyer@af83.com>