Use perfect forwarding in Ref::Append().
More tests, better error messages, misc small fixes.