cleaned up some helpers in java translation