java doc. Some workarounds were improved.