Finished phase 1 of java implementation