refactor java tuts.