fix wrappers, new api, qunit tests