Added Java implementation
Misc changes