Fixed documentation and missing constraint on function return type.