Small Java port cleanup.
Exposed conversion methods, to be able to create snapshots.
Progress on test case.