Made some changes to java, preparing for traces.