Updates to java api merging server and user sides