Improve tests and bindings