tidy up java bindings