Refactoring Java Integration part 1