should those functions be exported? I guess they should be static