Nearly done. Now to sort out the Java API
Comments for the test support