Copied javaclient and util over