Native call abstraction + misc fixes and tests.