rewrite hyphe api wrapping
Various fixes