light refactoring and Java fetch now works