Add doc comments to these and the Scala versions