Allow 'value' to be a String or a Function
Update doc and minor changes to tests