Initial work on functions. Native functions are nicely wrapped