Added javadoc

Hi Marco,
looking on all diffs below, I double checked that the merge is safe.